<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<#assign security=JspTaglibs["/WEB-INF/tlds/security.tld"]>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${this[0].getText("project_name")}</title>
<link type="text/css" href="${base}/static/css/style.css" rel="stylesheet" rev="stylesheet" />
<link rel="stylesheet" type="text/css" href="${base}/static/js/ext/resources/css/tree.css" />
</head>

<body style="background:#eef5f9;">

<div class="side_col">
	<div id="tree_nav"></div>
</div><!-- side_col -->

<script type="text/javascript" src="${base}/static/js/jquery.js"></script>
<script type="text/javascript" src="${base}/static/js/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="${base}/static/js/ext/ext-all.js"></script>
<script type="text/javascript">
var treedata = [{"id":"01","text":"固体废物处置资源管理","children":[{"id":"0101","text":"资质申报","leaf":true,"url":"${base}\/developing"},{"id":"0102","text":"资质审核","leaf":true,"url":"${base}\/developing"}],"leaf":false,"url":"${base}\/developing"},
                {"id":"02","text":"废物产生单位管理","children":[],"leaf":false,"url":"#"},
				{"id":"03","text":"废物转移管理","children":[],"leaf":false,"url":"${base}\/developing"},
				{"id":"04","text":"废物申报登记管理","children":[<@security.authorize ifAnyGranted="ROLE_ADMIN,ROLE_DECLARE">{"id":"0401","text":"信息填报","leaf":true,"url":"${base}\/declaration\/add"},</@security.authorize>
				  <@security.authorize ifAnyGranted="ROLE_ADMIN,ROLE_AUDIT_T,ROLE_AUDIT_C,ROLE_AUDIT_P">{"id":"0402","text":"信息审核","leaf":true,"url":"${base}\/produce\/audit\/waiting"},</@security.authorize>
				  {"id":"0403","text":"信息汇总","leaf":true,"url":"${base}\/stat\/show"}],"leaf":false,"url":"${base}\/developing"},
                {"id":"05","text":"废物处置利用单位管理","children":[],"leaf":false,"url":"${base}\/developing"},
				{"id":"06","text":"废物跨区域转移审批管理","children":[],"leaf":false,"url":"${base}\/developing"},
				{"id":"07","text":"废物运输、处置联单管理","children":[{"id":"0701","text":"废物产生单位联单录入","leaf":true,"url":"${base}\/developing"},{"id":"0702","text":"废物处置单位联单录入","leaf":true,"url":"${base}\/developing"},{"id":"0703","text":"联单审核","leaf":true,"url":"${base}\/developing"}],"leaf":false,"url":"${base}\/developing"},
				{"id":"08","text":"废物处置专项管理","children":[{"id":"0801","text":"处置情况填报","leaf":true,"url":"${base}\/developing"},{"id":"0802","text":"处置情况分析","leaf":true,"url":"${base}\/developing"}],"leaf":false,"url":"${base}\/developing"},
				{"id":"09","text":"废物处置检查管理","children":[],"leaf":false,"url":"${base}\/developing"},
				{"id":"10","text":"环境监察","children":[],"leaf":false,"url":"${base}\/developing"},
				{"id":"11","text":"监测监控","children":[],"leaf":false,"url":"${base}\/developing"},
				{"id":"12","text":"危险废物应急管理","children":[],"leaf":false,"url":"${base}\/developing"}
				<@security.authorize ifAnyGranted="ROLE_ADMIN">,
				{"id":"13","text":"基础数据维护","children":[{"id":"1301","text":"用户管理","leaf":true,"url":"${base}\/user\/list"},{"id":"1302","text":"组织管理","leaf":true,"url":"${base}\/city\/list"},{"id":"1303","text":"废物登记","leaf":true,"url":"${base}\/grabage\/list"}],"leaf":false,"url":"http:\/\/app1.tudou.com:8080\/sysadmin\/"}
				</@security.authorize>
				];
                
Ext.BLANK_IMAGE_URL = '${request.contextPath}/static/js/ext/resources/images/default/s.gif';
Ext.onReady(function(){
    // shorthand
    var Tree = Ext.tree;
    
    var tree = new Tree.TreePanel({
        el:'tree_nav',
        useArrows:false,
        autoScroll:true,
        animate:false,
        enableDD:false,
        containerScroll: true, 
        loader: new Tree.TreeLoader({
			preloadChildren: true,
			clearOnLoad: false
		})
    });

    // set the root node
    var root = new Tree.AsyncTreeNode({
        text: '系统菜单',
        draggable:false,
		expanded:true,
        id:'root',
		children:treedata
    });
    tree.setRootNode(root);

    // render the tree
    tree.render();
    root.expand(true);
	
	tree.on('click', function(node){
		if(node.leaf && node.attributes.url){
			window.parent.frames[2].location = node.attributes.url;
		}
	});
	
});

function getWindowHeight(){
	return $(window).height();
}

function getSideObj(){
	return $('#tree_nav, #ext-gen8');
}

$(function(){
	$('#tree_nav, #ext-gen8').height($(window).height() - 12);
});

window.onresize = function(){
	$('#tree_nav, #ext-gen8').height($(window).height() - 12);
};
</script>

</body>
</html>
